#include"Pointers.h"

int main(){
	CRectangle recta;
	recta.setValue(3, 4);
	CRectangle *rectb;
	rectb = &recta;
	rectb->setValue(3, 9);
	cout << "area:" << recta.area() << endl;
	cout << "area:" << rectb->area() << endl;
	CRectangle *rectc = new CRectangle();
	rectc->setValue(5, 6);
	rectb = rectc;
	rectc->setValue(7, 8);
	cout << "area:" << rectb->area() << endl;
	cout << "area:" << rectc->area() << endl;
	delete rectc;
	_getch();
	return 0;
}